package java_class_work.week05.SendAndCopy;

import java.io.IOException;

/**
 * @Auther: admin
 * @Date: 2022/10/11 11:26
 * @Description: 管道流测试
 */
public class Test {
    public static void main(String[] args) {
        Send send = new Send();
        Copy copy = new Copy();

        try {
            // 连接线程
            send.getPos().connect(copy.getPis());
            // 启动线程
            new Thread(send).start();
            new Thread(copy).start();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
